// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')
require("../api/api");
module.exports = {
    // production 环境
    build: {
        // 使用 prod.env 中定义的编译环境
        env: require('./prod.env'),
        index: path.resolve(__dirname, '../dist/index.html'),
        // 编译输出的静态资源根路径
        assetsRoot: path.resolve(__dirname, '../dist'),
        // 编译输出的二级目录
        assetsSubDirectory: 'static',
        // 编译发布上线路径的根目录，可配置为资源服务器域名或CDN域名
        assetsPublicPath: '/',
        // 是否开启 gzip
        productionGzip: false,
        // 需要使用 gsip 压缩的文件扩展名
        productionGzipExtensions: ['js', 'css']
    },
    // dev环境
    dev: {
        // 使用 dev.env 中定义的编译环境
        env: require('./dev.env'),
        // 进行测试页面的端口
        port: 8086,
        // 编译 输出的二级目录
        assetsSubDirectory: 'static',
        // 编译发布线上的根目录 可以自定义
        assetsPublicPath: '/',
        proxyTable: {
            '/dept/getOrgTree': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/dept/info': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/dept/create': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/dept/user': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changOrigin: true
            },
            '/dept/getChild': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changOrigin: true
            },
            '/dept': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changOrigin: true
            },
            '/auth/getAllAuth': {
                target: "http://" + global.addresslistZiIp + ":" + global.addresslistZiPort,
                changeOrigin: true,
            },
            '/org/info': {
                target: "http://" + global.companysetIp + ":" + global.companysetPort,
                changeOrigin: true,
            },
            '/org/save': {
                target: "http://" + global.companysetIp + ":" + global.companysetPort,
                changeOrigin: true,
            },
            '/api/file': {
                target: "https://" + global.uploadIp,
                changeOrigin: true,
            },
            '/org/list': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/org/create': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/org/childInfo': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/org/modifyChildOrg': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/book/upload': {
                target: "http://" + global.excelIp + ":" + global.excelPort,
                changeOrigin: true,
            },
            '/book': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },
            '/area/getArea': {
                target: "http://" + global.addresslistIp + ":" + global.regionPort,
                changeOrigin: true,
            },
            '/org/userLoginValid': {
                target: "http://" + global.loginIp + ":" + global.loginPort,
                changOrigin: true
            },
            '/oauth': {
                target: "http://" + global.loginTokenIp + ":" + global.loginTokenPort,
                changOrigin: true
            },
            '/org/registValid': {
                target: "http://" + global.registerIp + ":" + global.registerPort,
                changOrigin: true
            },
            '/get_validation_token': {
                target: "http://" + global.verifyIp + ":" + global.verifyPort,
                changOrigin: true
            },
            '/validation_img': {
                target: "http://" + global.verifyIp + ":" + global.verifyPort,
                changOrigin: true
            },
            '/get_sms_validation': {
                target: "http://" + global.verifyIp + ":" + global.verifyPort,
                changOrigin: true
            },
            '/get_sms': {
                target: "http://" + global.verifyIp + ":" + global.verifyPort,
                changOrigin: true
            },
            '/validation_sms': {
                target: "http://" + global.verifyIp + ":" + global.verifyPort,
                changOrigin: true
            },
            '/area/getArea': {
                target: "http://" + global.genreIp + ":" + global.genrePort,
                changOrigin: true
            },
            '/type/getType': {
                target: "http://" + global.genreIp + ":" + global.genrePort,
                changOrigin: true
            },
            '/index': {
                target: "http://" + global.businessIp + ":" + global.businessPort,
                changOrigin: true
            },
            '/admin/validate': {
                target: "http://" + global.settingupIp + ":" + global.settingupPort,
                changOrigin: true
            },
            '/admin/change': {
                target: "http://" + global.settingupIp + ":" + global.settingupPort,
                changOrigin: true
            },
            '/orgAdmin': {
                target: "http://" + global.settingupIp + ":" + global.settingupPort,
                changOrigin: true
            },
            '/admin/save': {
                target: "http://" + global.addresslistZiIp + ":" + global.addresslistZiPort,
                changOrigin: true
            },
            '/user/modifyPassWord': {
                target: "http://" + global.settingupIp + ":" + global.passwordPort,
                changOrigin: true
            },
            '/dept/user': {
                target: "http://" + global.addresslistZiIp + ":" + global.addresslistZiPort,
                changOrigin: true
            },
            '/dept/getChild': {
                target: "http://" + global.settingupIp + ":" + global.settingupPort,
                changOrigin: true
            },
            '/org/deleteChildOrg': {
                target: "http://" + global.addresslistIp + ":" + global.addresslistPort,
                changeOrigin: true,
            },

            '/version/findList': {
                target: "http://" + global.genreIp + ":" + global.genrePort,
                changOrigin: true
            },
            '/version/info': {
                target: "http://" + global.genreIp + ":" + global.genrePort,
                changOrigin: true
            },
            '/version/update': {
                target: "http://" + global.genreIp + ":" + global.genrePort,
                changOrigin: true
            },
            '/version/save': {
                target: "http://" + global.genreIp + ":" + global.genrePort,
                changOrigin: true
            },
            '/team': {
                target: "http://" + global.businessIp + ":" + global.businessPort,
                changOrigin: true
            },
        },
        // 是否开启 cssSourceMap
        cssSourceMap: false
    }
}